import java.util.Scanner;

/**
 * 纯数字串转为数组
 */
public class NumberToArrays {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str;
        System.out.println("请输入出数字的字符串：");
        str = scanner.nextLine();
        System.out.println("输出字符串：" + str);
        char[] numberArray = str.toCharArray();
        int[] intArray = new int[numberArray.length];
        for (int i = 0; i < numberArray.length; i++) {
            intArray[i] = numberArray[i] - '0';
            System.out.print(intArray[i] + " ");
        }
    }

}
